package com.enjoyor.soa.traffic.api.dto.gps;

import java.io.Serializable;
import java.util.Date;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * 定位信息
 */
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class PositionDto implements Serializable  {
	private static final long serialVersionUID = 1L;
	
	private String id;
	private String locid;		//定位标识
	private Double longitude;	//经度
	private Double latitude;	//纬度
	private Double speed;		//速度（Km/h）
	private Double direction;	//方向（0--359,正北为0，顺时针）
	private Double altitude;	//高程（m）
	private Date updateTime;	//更新时间
	private String location;	//地址（经纬度对应中文地址）
	private Integer	alarm;		//报警（0:非报警  1:报警）
	private String devtype;		//设备类型（冗余），具体见：DeviceTypeEnum
	private Integer devstatus;	//设备状态（0:离线   1:在线）
	//新增：
	private Integer loc_sign;//定位标志(1 定位 0 不定位) 
	private Double oil;	//油量(升)
	private Double mile;  //里程(米)
	/** 状态
		第0位:上线状态  0上线  1下线，  
		第1位:ACC  0 关  1 开,
		第2位:电源  0 外部电源 1 内部电池电源
		第3位:出租车运营状态  0 运营状态 1 停运
		第4位:出租车空车重车  0 空车 1 重车
	 */
	private Integer dstatus;
	

		//redis读取
		private String deviceCode;
		private String deviceTypeName;	
		private String deviceType;//10:警用装备;11:警车;12:警用枪支;
		private String personId;
		private String personName;
		private String localDepartment;
		private String localDepartmentName;
		private String carCard;
	
		
		
		public String getDeviceType() {
			return deviceType;
		}

		public void setDeviceType(String deviceType) {
			this.deviceType = deviceType;
		}

		public String getCarCard() {
			return carCard;
		}

		public void setCarCard(String carCard) {
			this.carCard = carCard;
		}

		public String getDeviceCode() {
			return deviceCode;
		}

		public void setDeviceCode(String deviceCode) {
			this.deviceCode = deviceCode;
		}

		public String getDeviceTypeName() {
			return deviceTypeName;
		}

		public void setDeviceTypeName(String deviceTypeName) {
			this.deviceTypeName = deviceTypeName;
		}


		public String getPersonId() {
			return personId;
		}

		public void setPersonId(String personId) {
			this.personId = personId;
		}

		public String getPersonName() {
			return personName;
		}

		public void setPersonName(String personName) {
			this.personName = personName;
		}

		public String getLocalDepartment() {
			return localDepartment;
		}

		public void setLocalDepartment(String localDepartment) {
			this.localDepartment = localDepartment;
		}

		public String getLocalDepartmentName() {
			return localDepartmentName;
		}

		public void setLocalDepartmentName(String localDepartmentName) {
			this.localDepartmentName = localDepartmentName;
		}

			
	/**
	 * 第1位:ACC	0 关  1 开
	 */
	public Integer getAcc() {
		return dstatus==null?null:((dstatus & 2)==1?1:0);
	}
	/**
	 * 第2位:电源	0 外部电源 1 内部电池电源
	 */
	public Integer getPower() {
		return dstatus==null?null:((dstatus & 4)==1?1:0);
	}
	/**
	 * 第0位:上线状态  0上线  1下线
	 */
	public Integer getOnline() {
		return dstatus==null?null:((dstatus & 0)==1?1:0);
	}
	/**
	 * 第3位:出租车运营状态  0 运营状态 1 停运
	 */
	public Integer getOperational() {
		return dstatus==null?null:((dstatus & 8)==1?1:0);
	}
	/**
	 * 第4位:出租车空车重车  0 空车 1 重车
	 */
	public Integer getEmpty() {
		return dstatus==null?null:((dstatus & 16)==1?1:0);
	}
	
	public Integer getDstatus() {
		return dstatus;
	}
	public void setDstatus(Integer dstatus) {
		this.dstatus = dstatus;
	}
	public Integer getLoc_sign() {
		return loc_sign;
	}
	public void setLoc_sign(Integer loc_sign) {
		this.loc_sign = loc_sign;
	}
	public Double getOil() {
		return oil;
	}
	public void setOil(Double oil) {
		this.oil = oil;
	}
	public Double getMile() {
		return mile;
	}
	public void setMile(Double mile) {
		this.mile = mile;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getLocid() {
		return locid;
	}
	public void setLocid(String locid) {
		this.locid = locid;
	}
	public Double getLongitude() {
		return longitude;
	}
	public void setLongitude(Double longitude) {
		this.longitude = longitude;
	}
	public Double getLatitude() {
		return latitude;
	}
	public void setLatitude(Double latitude) {
		this.latitude = latitude;
	}
	public Double getSpeed() {
		return speed;
	}
	public void setSpeed(Double speed) {
		this.speed = speed;
	}
	public Double getDirection() {
		return direction;
	}
	public void setDirection(Double direction) {
		this.direction = direction;
	}
	public Double getAltitude() {
		return altitude;
	}
	public void setAltitude(Double altitude) {
		this.altitude = altitude;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	public String getLocation() {
		return location;
	}
	public void setLocation(String location) {
		this.location = location;
	}
	public Integer getAlarm() {
		return alarm;
	}
	public void setAlarm(Integer alarm) {
		this.alarm = alarm;
	}
	public String getDevtype() {
		return devtype;
	}
	public void setDevtype(String devtype) {
		this.devtype = devtype;
	}
	public Integer getDevstatus() {
		return devstatus;
	}
	public void setDevstatus(Integer devstatus) {
		this.devstatus = devstatus;
	}

}
